package BehavioralMode.state.elevator.elevatorState;

import BehavioralMode.state.elevator.Context;
import BehavioralMode.state.elevator.ElevatorState;

public class OpenState extends ElevatorState {

    @Override
    public void open() {
       System.out.println("打开电梯");
    }

    @Override
    public void close() {
        super.context.setElevatorState(Context.closeState);
        super.context.getElevatorState().close();
    }

    @Override
    public void run() {
         System.out.println("电梯处于打开状态无法运行");
    }

    @Override
    public void stop() {
        System.out.println("电梯是打开状态无法停止");
    }
}
